home *** CD-ROM | disk | FTP | other *** search
- /*
- * $VER: sc.ged 2.0 (16.08.97)
- * Version V1.0 ©1994 Markus Zahn (Zahn@Uni-Augsburg.DE)
- * Compile current file using SAS/C 6.50
- * Version 2.0 changed by Stefan Steppat (Felix@hof.baynet.de)
- * for use with GOLDED 4.0 and SAS C V6.5x
- *
- * Note:
- *
- * Be careful with the AUTOEDIT option in env:sc/SCMSG, i.e. don't
- * use it. The GoldED GUI only gets unlocked, when you close the
- * compiler output window. Use the scmsg.ged script to retrieve your
- * errors/warnings instead!
- */
-
-
- OPTIONS RESULTS /* enable return codes */
-
- arg doComment /* set to TRUE for header */
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
-
- if (RC ~= 0) then
- exit
-
- OPTIONS FAILAT 6 /* ignore warnings */
-
- SIGNAL ON SYNTAX /* ensure clean exit */
-
-
- /* ------------------------- INSERT YOUR CODE HERE: ------------------ */
-
- 'QUERY CAT'
- isGerman = (result = "deutsch")
-
- 'QUERY MODIFY'
- if( result = 'TRUE' ) then
- do
- if( isGerman ) then
- 'REQUEST BODY="Datei wurde verändert. Speichern?" BUTTON="Speichern|Abbrechen"'
- else
- 'REQUEST BODY="File has been changed. Save it?" BUTTON="SAVE|CANCEL"'
-
- if( result = 1 ) then
- 'SAVE ALL'
- end
-
- 'QUERY ANYTEXT' /* any text loaded? */
- if( result = 'TRUE' ) then
- do
- 'QUERY FILE VAR FILENAME' /* get current filename */
- 'QUERY PATH VAR PATH' /* get path of current file */
-
- shell /* address shell */
-
- dir = pragma( 'directory', path ) /* goto directory of current file */
- 'sc:c/sc ' || filename /* compile current file */
- path = pragma( 'directory', dir ) /* go back to original directory */
- say
-
- shell /* address host (GoldED) */
-
- if( isGerman ) then
- say "Bitte das Closewindow Gadget drücken"
- else
- say "Done (press the close gadget)."
- pull dummy
- end
- else
- do
- if( isGerman ) then
- 'REQUEST BODY="Kein Text vorhanden!?"'
- else
- 'REQUEST BODY="Text buffer is empty!?"'
- end
-
- /* ---------------------------- END OF YOUR CODE ----------------------- */
-
- 'UNLOCK' /* VERY important: unlock GUI */
- EXIT
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
- 'UNLOCK'
- EXIT
-
-